from multiprocessing import Process
from 代理.core.capture.run_spiders import RUNSPIDER
from 代理.core.proxy_test import PROXY_TEST


def run():
    process_list=[]
    #启动爬虫
    process_list.append(Process(target=RUNSPIDER.start))
    #启动检测
    process_list.append(Process(target=PROXY_TEST.start))
    for process in process_list:
        #守护线程
        process.daemon=True
        process.start()
    #遍历列表让主进程等待子进程
    for process in process_list:
        process.join()

if __name__ == '__main__':
    run()